import { Column, Entity } from 'typeorm';
import { PublicEntity } from '../../public.entity';


@Entity('role_access')
export class RoleAccessEntity extends PublicEntity {

	@Column({
		type: 'int',
		nullable: true,
		name: 'role_id',
		comment: '角色id'
	})
	roleId: number;


	@Column({
		type: 'int',
		nullable: true,
		name: 'access_id',
		comment: '资源id'
	})
	accessId: number;


	@Column({
		type: 'varchar',
		nullable: true,
		length: 10,
		name: 'type',
		default: () => 1,
		comment: '类型,type=1表示菜单,type=2表示接口'
	})
	type: string | null;

}
